﻿<%@ page contentType="text/html;charset=utf-8" language="java"
	import="com.broadengate.model.Card,com.broadengate.model.Customer,org.apache.struts.Globals"
	errorPage=""%>
<html>
	<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
	<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
	<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic"%>
	<head>
		<title>ATM-查询余额</title>
	</head>
	<link href="css/css.css" type="text/css" rel="stylesheet">
	<body>
		<script type="text/javascript"> 	
		var cardNO = <%=session.getAttribute("cardNO")%>;
   		  	if(cardNO==null) {
   		  	    alert("<bean:message key="out.second" />");
   		  	   document.location.href="index.jsp";
		}
             var ifsound = "<%=session.getAttribute("ifsound")%>";
   		  	 var inter = "<%= session.getAttribute(Globals.LOCALE_KEY)%>";
   		  	 
   		  	if(ifsound=="yes"&&inter=="zh_CN") {
   		  	   document.write("<bgsound src='./sound/query.mp3'>");
   		  	   
   		  	}
   		  	else if(ifsound=="yes"&&inter=="en_US") {

   		  	   document.write("<bgsound src='./sound/Equery.mp3'>");
   		  	   
   		  	}

</script>
		<div id="container">
			<div id="banner">
				<table width="800px" height="170px" cellSpacing="0" cellPadding="0" align="center" background="images/banner.jpg">
  			<tr>
  				<td>
						<div id="scrollContainer" style="width:100%;overflow:hidden;margin-top:120">
							<div id="scrollContent" style="width:200%;height:20%">
								<!-- 字幕的内容 -->
								<table cellspacing="0" cellpadding="0" border="0" width="100%">
									<tr style="margin-top:0pt">
										<td id="firstCol" width="50%" align="top">											
											<p><font size="4" face="隶书"><b><bean:message key="index.jsp.icbc" /></b></font></p>
										</td>
										<td id="lastCol" width="50%"></td>
									</tr>
								</table>
							</div>
						</div>
  				</td>
  			</tr>
  		</table>
			</div>
			<div id="leftbar">
				<div id="left1">
  					<div class="tab">
						<img style="margin-right:10px;" src="images/dot.gif" border=0/><bean:message key="title.one"/>
					</div>
					<p class="choosed"><a href="queryAction.do?method=query&cardNO=${cardNO}"
						style="color:black;">
						<img src="images/angle.gif" border=0 />&nbsp;<font size=3><bean:message key="select.query"/></font>		 
					</a></p>
					<p class="choose"><a href="deposit.jsp" style="color:black;">
						<img src="images/angle.gif" border=0 />&nbsp;<font size=3><bean:message key="select.deposit"/></font>
					</a></p>
					<p class="choose"><a href="draw.jsp" style="color:black">
						<img src="images/angle.gif" border=0 />&nbsp;<font size=3><bean:message key="select.draw"/></font>			
					</a></p>
					<p class="choose"><a href="transfer.jsp" style="color:black;">
						<img src="images/angle.gif" border=0 />&nbsp;<font size=3><bean:message key="select.transfer"/></font>
				 	</a></p>
					<p class="choose"><a href="passwordChange.jsp" style="color:black;">
						<img src="images/angle.gif" border=0 />&nbsp;<font size=3><bean:message key="select.passwordchange"/></font>
					</a></p>
					<p class="choose"><a href="operaHistoryAction.do?method=getHistory&cardNO=${cardNO}&type=1"
						style="color:black;">
						<img src="images/angle.gif" border=0 />&nbsp;<font size=3><bean:message key="select.log"/></font>
					</a></p>
				</div>
				<div id="left2">
					<div class="tab">
						<img style="margin-right:10px;" src="images/dot.gif" border=0/><bean:message key="title.two"/>
					</div>
					<div>
						<p class="p2"><bean:message key="title.two.one"/><font color="red">95588</font></p>
						<p class="p2"><bean:message key="title.two.two"/><font color="red">40088</font></p>
					</div>
				</div>
			</div>
			<div id="content">
				<div id="center">
					<p class="label1"><img src="images/tip.gif">&nbsp;<bean:message key="title.query" /></p>
					<p class="label2">
						<bean:message key="query.balance"/>
					</p>
					<table class="table" cellspacing="1" cellpadding="10">
						<tr>
							<th class="t" width="100" scope="row">
								<bean:message key="deposit.jsp.ch"/>
							</th>
							<td class="t" width="100">
								${rmbBalance}
							</td>
						</tr>
						<tr>
							<th class="t" scope="row">
								<bean:message key="deposit.jsp.us"/>
							</th>
							<td class="t">
								${dollarBalance}
							</td>
						</tr>
						<tr>
							<th class="t" scope="row">
								<bean:message key="deposit.jsp.eu"/>
							</th>
							<td class="t">
								${euroBalance}
							</td>
						</tr>
					</table>
				</div>
				<div id="rightbar">
				<div id="right1">
						<div class="tab">
							<img style="margin-right:10px;" src="images/dot.gif" border=0/><bean:message key="title.third"/>
						</div>
						<div>
							<p style="font-family:幼圆;"><bean:message key="title.third.one"/>，${customerName}
								<a href="exitAction.do?method=exit" style="color:blue;">[<bean:message key="title.third.two"/>]</a>
							</p>
						</div>
					</div>
				<div>
					<img src="images/logo.gif" border=0 />
				</div>
				<div>
					<img src="images/ad4.gif" border=0 />
				</div>
				<div id="right2">
					<div class="tab">
							<img style="margin-right:10px;" src="images/dot.gif" border=0/><bean:message key="title.forth"/>
						</div>
						<div>
							<p><a href="http://www.icbc.com.cn/icbc/"  class="p3"><bean:message key="title.forth.one"/></a></p>
							<p><a href="http://www.boc.cn/"  class="p3"><bean:message key="title.forth.two"/></a></p>
							<p><a href="http://www.95599.cn/cn/"  class="p3"><bean:message key="title.forth.third"/></a></p>
							<p><a href="http://www.ccb.com/cn/home/index.html"  class="p3"><bean:message key="title.forth.forth"/></a></p>
						</div>
				</div>
			</div>
			</div>
			<div id="footer">
				<p style="margin-top:5px; margin-bottom:5px;"><bean:message key="index.jsp.end"/></p>
				<p style="margin-top:0 px; padding-top:0px;"><bean:message key="index.jsp.end.one"/>&nbsp;&nbsp;|&nbsp;&nbsp;
				<bean:message key="index.jsp.end.two"/>&nbsp;&nbsp;|&nbsp;&nbsp;
				<bean:message key="index.jsp.end.third"/>&nbsp;&nbsp;|&nbsp;&nbsp;
				<bean:message key="index.jsp.end.forth"/></p>
			</div>
		</div>
<script type="text/javascript" language="javascript">
    var stopscroll = false;
    var scrollSpeed = 5; //这个参数用来确定滚动速度的，数值越小滚动速度越快
    var scrollContainer = document.getElementById("scrollContainer"); //获取scrollContainer
    var scrollContent = document.getElementById("scrollContent");//获取scrollContent
    var firstCol = document.getElementById("firstCol");
    var lastCol = document.getElementById("lastCol");   
    lastCol.innerHTML = firstCol.innerHTML;//注意这里，将第一列的内容复制到第二列，这样可以保证滚动看起来更连续
    scrollContainer.noWrap = true;  
    //下面是两个事件：[01]鼠标经过，停止滚动[02]鼠标离开，开始滚动
    scrollContainer.onmouseover = new Function("stopscroll=true;"); 
    scrollContainer.onmouseout = new Function("stopscroll=false;");    
    //进行初始化
    function init(){
    	scrollContainer.scrollLeft = 0;
    	setInterval("scrollLeft()", scrollSpeed);//按时间间隔不断执行函数scrollLeft()
    }
    init(); 
    //下面就是改变滚动位置，如果滚出区域，则判断当前位置进行初始化调整
    var currLeft = 0;
    function scrollLeft(){
    	if(stopscroll == true) 
    		return; //如果变量"stopscroll"为真，则停止滚动
    	
    	currLeft = scrollContainer.scrollLeft;
    	scrollContainer.scrollLeft += 1;//每次左移一个像素
    	//如果滚动到最左侧了就初始化
    	if(currLeft == scrollContainer.scrollLeft){
    		scrollContainer.scrollLeft = 1;
    		//scrollContainer.scrollLeft += 1;
    	}
    }
</script>
	</body>
</html>